home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / tcqbsnip.zip / BLINK.BAS < prev    next >
BASIC Source File  |  1997-06-20  |  2KB  |  53 lines

  1. ' BLINK.BAS
  2. ' by Tika Carr
  3. '
  4. ' Donated to the public domain
  5. ' No warranties or guarantees are expressed or implied.
  6. '
  7. ' Purpose: Allow use of blinking or high intensity background
  8. '
  9. ' Start QuickBasic with: QB /L QB.QLB
  10. '
  11. ' NOTES: For the first color, you must add 16 to the color that should be
  12. '        Displayed. ie. for COLOR 14, 11, use COLOR 30, 11 (14 + 16 = 30)
  13. '
  14. '        If you still get blinks, set blink to 1, then immediately to 0
  15. '        again.
  16.  
  17. DECLARE SUB blink (flag%)
  18. '$INCLUDE: 'qb.bi'
  19.  
  20.  
  21. blink 0        'Turn on high intensity background support for CGA text.
  22.  
  23.  
  24. COLOR 30, 12              'Yellow on bright red
  25. CLS
  26. PRINT "Press any key to see something else..."
  27. Pause$ = INPUT$(1)
  28. COLOR 14, 12              'This is what happens when you use normal colors
  29. PRINT "If you don't add 16 to the foreground color, it automatically turns"
  30. PRINT "off the high intensity bit!"
  31. PRINT : PRINT "Press any key for more..."
  32. Pause$ = INPUT$(1)
  33. COLOR 17, 12              ' Dark Blue on bright red.
  34. PRINT "Now we have it back on again!"
  35. PRINT : PRINT "Press any key to turn off the blink bit..."
  36. Pause$ = INPUT$(1)
  37. blink 1        'Turn off high intensity background support
  38. COLOR 30, 12
  39. PRINT "Now we are doing a COLOR 30, 12 here without high intensity on..."
  40. PRINT "Press any key to continue."
  41. Pause$ = INPUT$(1)
  42. COLOR 1, 12
  43. PRINT "This is COLOR 1, 12. The background is low intensity, but no blink."
  44.  
  45. SUB blink (flag%)
  46. DIM Inregs AS RegType, Outregs AS RegType
  47. Inregs.ax = &H1003
  48. Inregs.bx = 0
  49. IF flag% = 1 THEN Inregs.bx = 1
  50. CALL INTERRUPT(&H10, Inregs, Outregs)
  51. END SUB
  52.  
  53.